<!DOCTYPE html>
<html>

<head>
<meta content="application/xhtml+xml;charset=UTF-8"
	http-equiv="Content-Type">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>活动促销</title>

<link rel="stylesheet" type="text/css" href="plugins/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="plugins/pagination.css" />
<link rel="stylesheet" type="text/css" href="css/public.css">
<link rel="stylesheet" type="text/css" href="css/nav.css">
<link rel="stylesheet" type="text/css" href="css/styleindex.css">
<link rel="stylesheet" type="text/css" href="css/promotion.css" />
<link rel="stylesheet" type="text/css"
	href="js/pagination/mricode.pagination.css" />

<script src="plugins/jquery.min.js" type="text/javascript"></script>
<script src="plugins/bootstrap.min.js" type="text/javascript"></script>
<script src="plugins/jquery.pagination.js" type="text/javascript"></script>
<script src="js/nav.js" type="text/javascript"></script>
<script type="text/javascript" src="js/pagination/mricode.pagination.js"></script>
<script type="text/javascript" src="js/date.js"></script>
<script type="text/javascript">
	$(function() {
		// 初始化分页的控件
		$("#page").pagination({
			pageSize : 4,// 每一页显示多少条数据
			remote : {
				url : 'promotionAction_pageQuery.action', // 请求地址
				success : function(data) {
					//清空节点
					$("#hiddenpromotion").empty();
					$.each(data.list, function(i, item) {
						var str = '<div class="result col-md-3">';
						str += '<div class="thumbnail">';
						str += '<img src="http://localhost:8080/bos_management_web'  + item.titleImg +  '">';
						str += '<div class="caption"><p>' + item.title + '</p>';
						
						var statusString="进行中"
						if(item.status == "2"){
							statusString="过期"
						}
						
						str += '<p class="text-right status"><span>' + statusString + '</span></p>';
						str += '<p class="text-right grey">' + dateFormat(item.startDate.time)  + '  -  ' +dateFormat(item.endDate.time)  + '</p>';
						str += '<p class="text-right grey">' + item.activeScope + '</p>';
						str += '</div></div></div>';
						$("#hiddenpromotion").append(str);
					});
				},
				totalName : 'total' // 服务器返回的数据中,那一个属性代表总数据条数.要和Pagebean中标识总数据条数的字段保持一致
			}
		});
	})
</script>

</head>

<body>
	<!--nav-->
	<div id="headnav">
		<div class="mainnav">
			<nav class="nav navbar-default">
				<div class="container">
					<div class="navbar-header">
						<button type="button" class="navbar-toggle collapsed"
							data-toggle="collapse"
							data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
							<span class="sr-only">折叠菜单</span>
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
						</button>
						<a class="navbar-brand" href="#">
							<img src="img/icon/logo.png">
						</a>
					</div>
					<div class="collapse navbar-collapse">
						<ul class="nav navbar-nav navbar-right" id="menu">
							<li>
								<a href="index.html" target="_blank">首页</a>
							</li>
							<li>
								<a href="order.html" target="_blank">在线下单</a>
							</li>
							<li>
								<a href="express_manage.html" target="_blank">快件管理</a>
							</li>
							<li>
								<a href="userinfo.html" target="_blank">账户管理</a>
							</li>
							<li>
								<a href="search.html" target="_blank">查询服务</a>
							</li>
							<li>
								<a href="myhome.html" target="_blank">我的主页</a>
							</li>
							<li>
								<a href="login.html" target="_blank">登录</a>
							</li>
						</ul>
					</div>
				</div>
			</nav>
		</div>
	</div>

	<div class="promotion">
		<!-- banner-->
		<section class="bannerarea">
			<div class="bannerimg">
				<img src="img/show/suyun/banner.png" class="img-responsive"
					alt="Responsive image">
			</div>
		</section>
		<!-- maincontent-->
		<section class="container">
			<div class="activitybox">
				<!--title Area-->
				<div class="areatitle">
					<h2 class="text-left">
						<span class="title">活动促销</span>
					</h2>
					<p class="english">
						<span class="subtitle">ACTIVITY PROMOTION</span>
					</p>
					<ul class="list-inline">
						<li class="active">全国</li>
						<li>华中</li>
						<li>华南</li>
						<li>华北</li>
					</ul>
				</div>
				<!--detail 	Data-->
				<div id="promotionresult"></div>
				<div id="hiddenpromotion" style="overflow: hidden">
					<!-- 列表元素 -->

				</div>
				<!-- 这里显示分页 -->
				<div id="page" class="m-pagination"></div>
			</div>
		</section>
	</div>
	<div class="nav-bottom"></div>
	<a href="#0" class="cd-top">Top</a>
</body>

</html>